package com.sfddata.musicpillow.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 
 * @TableName month_report_info
 */
@TableName(value ="month_report_info")
@Data
@NoArgsConstructor
public class MonthReportInfoVo implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 绑定用户
     */
    private Integer userId;

    /**
     * 起始时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date startDay;
    // @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    // private Date endDay;
    /**
     * 睡眠分数表
     */
    private List<String> sleepScoreTable;

    /**
     * 平均睡眠分数
     */
    private Float avgSleepScore;

    /**
     * 对比数据
     */
    private  Float compareSleepScore;

    /**
     * 睡眠时长表
     */
    private List<String> sleepTimeTable;
    /**
     * 入睡时间 -- 不需要了 修改图了 这个是画睡眠时间表起点的
     */
    private List<String> AsleepTimeTable;
    /**
     * 平均睡眠时长（分）
     */
    private Float avgSleepTime;
    private Float compareSleepTime;
    /**
     * 入睡用时表
     */
    private List<String> asleepTable;
    /**
     * 平均入睡用时(分)
     */
    private Float avgAsleep;
    private Float compareAsleep;
    /**
     * 深睡时长表
     */
    private List<String> deepSleepTable;

    /**
     * 深睡时长(分)
     */
    private Float avgDeepSleep;
    private Float compareDeepSleep;
    /**
     * 鼾声表
     */
    private List<String> snoreTable;
    /**
     * 平均打鼾时长(分)
     */
    private Float avgSnore;
    private Float compareSnore;
    /**
     *
     */
    private List<String> ahiTable;
    /**
     *
     */
    private Float avgAhi;
    private Float compareAhi;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    // @Override
    // public boolean equals(Object that) {
    //     if (this == that) {
    //         return true;
    //     }
    //     if (that == null) {
    //         return false;
    //     }
    //     if (getClass() != that.getClass()) {
    //         return false;
    //     }
    //     MonthReportInfoVo other = (MonthReportInfoVo) that;
    //     return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
    //         && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
    //         && (this.getStartDay() == null ? other.getStartDay() == null : this.getStartDay().equals(other.getStartDay()))
    //         && (this.getSleepScoreTable() == null ? other.getSleepScoreTable() == null : this.getSleepScoreTable().equals(other.getSleepScoreTable()))
    //         && (this.getAvgSleepScore() == null ? other.getAvgSleepScore() == null : this.getAvgSleepScore().equals(other.getAvgSleepScore()))
    //         && (this.getSleepTimeTable() == null ? other.getSleepTimeTable() == null : this.getSleepTimeTable().equals(other.getSleepTimeTable()))
    //         && (this.getAvgSleepTime() == null ? other.getAvgSleepTime() == null : this.getAvgSleepTime().equals(other.getAvgSleepTime()))
    //         && (this.getAsleepTable() == null ? other.getAsleepTable() == null : this.getAsleepTable().equals(other.getAsleepTable()))
    //         && (this.getAvgAsleep() == null ? other.getAvgAsleep() == null : this.getAvgAsleep().equals(other.getAvgAsleep()))
    //         && (this.getDeepSleepTable() == null ? other.getDeepSleepTable() == null : this.getDeepSleepTable().equals(other.getDeepSleepTable()))
    //         && (this.getAvgDeepSleep() == null ? other.getAvgDeepSleep() == null : this.getAvgDeepSleep().equals(other.getAvgDeepSleep()))
    //         && (this.getSnoreTable() == null ? other.getSnoreTable() == null : this.getSnoreTable().equals(other.getSnoreTable()))
    //         && (this.getAvgSnore() == null ? other.getAvgSnore() == null : this.getAvgSnore().equals(other.getAvgSnore()))
    //         && (this.getAhiTable() == null ? other.getAhiTable() == null : this.getAhiTable().equals(other.getAhiTable()))
    //         && (this.getAvgAhi() == null ? other.getAvgAhi() == null : this.getAvgAhi().equals(other.getAvgAhi()));
    // }

    // @Override
    // public int hashCode() {
    //     final int prime = 31;
    //     int result = 1;
    //     result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
    //     result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
    //     result = prime * result + ((getStartDay() == null) ? 0 : getStartDay().hashCode());
    //     result = prime * result + ((getSleepScoreTable() == null) ? 0 : getSleepScoreTable().hashCode());
    //     result = prime * result + ((getAvgSleepScore() == null) ? 0 : getAvgSleepScore().hashCode());
    //     result = prime * result + ((getSleepTimeTable() == null) ? 0 : getSleepTimeTable().hashCode());
    //     result = prime * result + ((getAvgSleepTime() == null) ? 0 : getAvgSleepTime().hashCode());
    //     result = prime * result + ((getAsleepTable() == null) ? 0 : getAsleepTable().hashCode());
    //     result = prime * result + ((getAvgAsleep() == null) ? 0 : getAvgAsleep().hashCode());
    //     result = prime * result + ((getDeepSleepTable() == null) ? 0 : getDeepSleepTable().hashCode());
    //     result = prime * result + ((getAvgDeepSleep() == null) ? 0 : getAvgDeepSleep().hashCode());
    //     result = prime * result + ((getSnoreTable() == null) ? 0 : getSnoreTable().hashCode());
    //     result = prime * result + ((getAvgSnore() == null) ? 0 : getAvgSnore().hashCode());
    //     result = prime * result + ((getAhiTable() == null) ? 0 : getAhiTable().hashCode());
    //     result = prime * result + ((getAvgAhi() == null) ? 0 : getAvgAhi().hashCode());
    //     return result;
    // }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", startDay=").append(startDay);
        sb.append(", sleepScoreTable=").append(sleepScoreTable);
        sb.append(", avgSleepScore=").append(avgSleepScore);
        sb.append(", sleepTimeTable=").append(sleepTimeTable);
        sb.append(", avgSleepTime=").append(avgSleepTime);
        sb.append(", asleepTable=").append(asleepTable);
        sb.append(", avgAsleep=").append(avgAsleep);
        sb.append(", deepSleepTable=").append(deepSleepTable);
        sb.append(", avgDeepSleep=").append(avgDeepSleep);
        sb.append(", snoreTable=").append(snoreTable);
        sb.append(", avgSnore=").append(avgSnore);
        sb.append(", ahiTable=").append(ahiTable);
        sb.append(", avgAhi=").append(avgAhi);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}